@extends('layouts.master')

@section('title')
港口管理——木投网商城管理后台
@stop

@section('app_css')
<link href="/resource/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="/resource/css/style.css">
<link rel="stylesheet" href="/resource/css/dataTables.bootstrap.css">
<link rel="stylesheet" href="/resource/css/fileinput.min.css">
<link href="/resource/css/bootstrap-datetimepicker.css" rel="stylesheet">
@stop

@section('app_js')

@stop


@section('content')
    @include('common.nav')
<div class="container-fluid">
    <div class="row" id="navLeft">
        @include('common.service_nav')
        <div class="col-lg-10">
            <div class="navbottom">
              <span>您的位置：</span>其他 > 广告位管理
            </div>
            <div class="contentNav">
              <ul>
                <li>其他</li>
                <li class="btn btn-default"><a href="/show_ads">列表</a></li>
                <li class="btn btn-default active"><a href="/add_ads">新增</a></li>
              </ul>
            </div>
            <hr>
            <div class="contentMember_new">
              {{ Form::open(['url'=>'/edit_ads', 'files' => true, 'method' => 'post']) }}
                <table class="table table-hover">
                  <tbody>
                  <tr>
                      <th>名称</th>
                  </tr>
                  <tr class="newBorder_top">
                      <th>
                          <input type="text" class="input-small form-control" name="ads_name" value="{{ $ads->ads_name }}">
                      </th>
                  </tr>
                    <tr>
                      <th>图片</th>
                    </tr>
                    <tr class="newBorder_top">
                      <th>
                        <input id="input-id" type="file" class="file" data-preview-file-type="text" name="img">
                      </th>
                    </tr>
                  <tr>
                      <th>类型</th>
                  </tr>
                  <tr class="newBorder_top">
                      <th>
                          <select class="form-control" name="type">
                              <option value="0">请选择</option>
                              @foreach($ads_types as $k => $ads_type)
                              <option value="{{ $k }}" @if($ads->type == $k) selected @endif>{{ $ads_type }}</option>
                                  @endforeach
                          </select>
                      </th>
                  </tr>
                    <tr>
                      <th>链接</th>
                    </tr>
                    <tr class="newBorder_top">
                      <th>
                        <input type="text" class="input-small form-control" name="url" value="{{ $ads->url }}">
                      </th>
                    </tr>
                    <tr>
                      <th>排序</th>
                    </tr>
                    <tr class="newBorder_top">
                      <th>
                          <input type="text" class="input-small form-control" name="order_by" value="{{ $ads->ads_order_by}}">
                      </th>
                    </tr>
                  </tbody>
                </table>
                  <button type="submit" class="btn btn-default">提交</button>
                 <input type="hidden" name="ads_id" value="{{ $ads->ads_id }}">
            {{ Form::close() }}
            </div>
        </div>
    </div>
</div>
@stop